package com.saybiu.dao;

import com.saybiu.domain.Comment;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author: liming
 * @Date: 2021/4/17 14:34
 */
public interface CommentDao {

    /**
     * 删除帖子时，删除回复评论表
     * @param postId 帖子id
     * @return
     */
    Integer deleteReplyComment(@Param("postId") Integer postId);

    /**
     * 向帖子回复评论表中添加记录
     * @param comment
     * @return
     */
    Integer addReplyComment(Comment comment);

    /**
     * 撤销回复评论
     * @param replyId
     * @return
     */
    Integer deleteReplyCommentByReplyId(@Param("replyId") Integer replyId);


    /**
     * 通过回复评论表id 查询回复评论表
     * @param replyCommentId
     * @return
     */
    Comment selectReplyCommentByReplyCommentId(@Param("replyCommentId") Integer replyCommentId);


    /**
     * 根据回复帖子表的id 查询回复评论表
     * @param replyId
     * @return
     */
    List<Comment> selectReplyCommentByReplyId(@Param("replyId") Integer replyId);
}
